package com.ymttest.database.sqlwapper;

import java.util.List;

import com.ymt.core.tool.Logger;
import com.ymt.database.SqlManager;
import com.ymttest.database.model.Ymt_ProductDescConfigPicture;
import com.ymttest.database.model.YmtProductsI;
import com.ymttest.utils.EnvSetup;

/************************************************************************************
 * @File name : Ymt_ProductDescConfigPictureWapper.java
 * @Author : zhouyi
 * @Date : 2015年5月19日
 * @Copyright : 洋码头
 ************************************************************************************/
public class Ymt_ProductDescConfigPictureWapper {
	SqlManager manage;

	public Ymt_ProductDescConfigPictureWapper() {
		manage = new SqlManager("intpro");
	}

	

	public   List<Ymt_ProductDescConfigPicture> selectbyProductId(String productId) throws InterruptedException {
	    @SuppressWarnings("unchecked")
	    List<Ymt_ProductDescConfigPicture>  ymt_ProductDescConfigPicturelst = manage.getSelectResults(
	            "com.ymttest.database.mapping.Ymt_ProductDescConfigPictureMapper.selectbyProductId", productId);
	    return ymt_ProductDescConfigPicturelst;
	}
	
	
	public static void main(String args[]) {
	    try {
	         
	    	Ymt_ProductDescConfigPictureWapper Ymt_ProductDescConfigPictureWapper = new Ymt_ProductDescConfigPictureWapper();	                 
	    	List<Ymt_ProductDescConfigPicture> rm = Ymt_ProductDescConfigPictureWapper.selectbyProductId("af0c3f43-d98a-4593-93ba-e5c92f2d0107");
	        for(int i=0;i<rm.size();i++)
	        {
	        	System.out.println("11:"+rm.get(i).getPictureUrl());
	        }
	         
	    } catch (InterruptedException e) {
	        e.printStackTrace();
	    }
	}
	
	/**
	 * 关闭数据库连接
	 */
	public void close() {
		manage.close();
	}

	@Override
	protected void finalize() throws Throwable {
		this.close();
		manage = null;
		super.finalize();
	}


}
